<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div class="erweima hide" id="er"></div>
  <script>
    //获取元素
    var diver = document.getElementById("er");
    //修改hide为show
    //一
    diver.className = "erweima show";
    //二
    diver.setAttribute("class","erweima show");
  </script>
</body>
</html>